import http from "../http";

// @NotNull(message = "请输入目标评论ID")
// private Integer targetId;
// @NotNull(message = "请输入目标评论分类")
// private Integer targetType;
// @NotEmpty(message = "请输入评论目标用户名")
// private String toUsername;
// @NotEmpty(message = "请输入评论人用户名")
// private String fromUsername;
// @NotEmpty(message = "请输入评论人姓名")
// private String fromName;
// @NotEmpty(message = "请输入评论人头像")
// private String fromAvatar;
// @NotEmpty(message = "请输入评论内容")
// private String content;
function createCommentRoot(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/createCommentRoot',
        method: 'post',
        data: params,
    })
}
function createCommentReply(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/createCommentReply',
        method: 'post',
        data: params,
    })
}


function commentList(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/commentList',
        method: 'post',
        data: params,
    })
}
function likeCommentRoot(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/likeCommentRoot',
        method: 'post',
        data: params,
        header: {
            'content-type': 'application/x-www-form-urlencoded'
        }
    })
}
function id(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/id',
        method: 'post',
        data: params,
        header: {
            'content-type': 'application/x-www-form-urlencoded'
        }
    })
}

function getCommentNoReadNum(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/getCommentNoReadNum',
        method: 'post',
        data: params,
    })
}
function getReplyNoReadNum(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/getReplyNoReadNum',
        method: 'post',
        data: params,
    })
}
function commentRootQueryList(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/commentRootQueryList',
        method: 'post',
        data: params,
    })
}
function commentReplyQueryList(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/commentReplyQueryList',
        method: 'post',
        data: params,
    })
}
function commentRootReadById(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/commentRootReadById',
        method: 'post',
        data: params,
        header: {
            'content-type': 'application/x-www-form-urlencoded'
        }
    })
}
function queryByTargetIdBothUsername(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/queryByTargetIdBothUsername',
        method: 'post',
        data: params,
        header: {
            'content-type': 'application/x-www-form-urlencoded'
        }
    })
}
function commentReplyReadById(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/commentReplyReadById',
        method: 'post',
        data: params,
        header: {
            'content-type': 'application/x-www-form-urlencoded'
        }
    })
}

function queryByToUsername(params: any = {}) {
    return http.myRequest({
        url: '/chat/comment/queryByToUsername',
        method: 'post',
        data: params,
        header: {
            'content-type': 'application/x-www-form-urlencoded'
        }
    })
}
export default {
    createCommentRoot,
    createCommentReply,
    commentList,
    likeCommentRoot,
    id,
    getCommentNoReadNum,
    getReplyNoReadNum,
    commentRootQueryList,
    commentReplyQueryList,
    commentRootReadById,
    queryByTargetIdBothUsername,
    commentReplyReadById,
    queryByToUsername
}


